﻿
namespace SHomeWorkshop.LunarPresentation.Commands
{
    public partial class Command
    {
        public static void SwitchShowBackText()
        {
            if (Globals.selectedEditor == null) return;
            if (Globals.selectedEditor.SelectedExpression == null) return;
            if (Globals.selectedEditor.SelectedExpression is Expressions.BaseText == false) return;

            ModifingItem mi = new ModifingItem();

            Expressions.BaseText bt = Globals.selectedEditor.SelectedExpression as Expressions.BaseText;

            Action action = new Action(bt.ExID, -1, bt.GetType().Name, "ShowBackText",
                bt.ShowBackText.ToString(), (!bt.ShowBackText).ToString());
            bt.ShowBackText = !bt.ShowBackText;

            mi.Add(action);
            bt.Editor.Do(mi);
        }
    }
}
